using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;

namespace MapDrawer
{
    public class ScaleGestureDetector : Android.Views.ScaleGestureDetector.SimpleOnScaleGestureListener
    {

        private Painter _painter;

        public ScaleGestureDetector(Painter p)
        {
            _painter = p;
        }

        public override bool OnScale(Android.Views.ScaleGestureDetector detector)
        {
            var scaleFactor = detector.ScaleFactor;
            _painter.Zoom(scaleFactor);
            return detector.IsInProgress;
        }
    }
}